<template>
  <div>
    {{ this.deptModel ? this.deptModel.name : '无' }}
  </div>
</template>

<script>
export default {
  name: "el-column-dept",
  props: {
    row: [Object],
    rowKey: [String]
  },
  data() {
    return {
      text: "",
      deptModel: {}
    }
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      this.$store.dispatch("getDeptById", this.row[this.rowKey]).then(res => {
        this.deptModel = res
      })
    }
  }
}
</script>

<style scoped>

</style>
